import xadmin
from django.contrib import admin

# Register your models here.
# 全局配置
from xadmin.views import BaseAdminView, CommAdminView


class ThemeSetting(object):
    """配置主题"""
    # 可以切换主题
    enable_themes = True
    use_bootswatch = True


class CustomView(object):
    site_title = '电商平台后台管理'  # 网页头部导航
    site_footer = 'centos@163.com'  # 底部版权
    meun_style = 'accordion'  # 左侧导航折叠筐


class VerifyCodeAdmin():
    list_display = ['add_time', 'code', 'user']


from .models import VerifyCode

xadmin.site.register(VerifyCode, VerifyCodeAdmin)
xadmin.site.register(BaseAdminView, ThemeSetting)  # 对配置进行注册
xadmin.site.register(CommAdminView, CustomView)
